const axios = require('axios').default;
axios.defaults.baseURL = 'http://47.96.154.185:3701';
// 定义token验证
if (sessionStorage.getItem('token')) {
    let token = sessionStorage.getItem('token')
    // console.log(token);
    axios.defaults.headers.common['Authorization'] = 'Bearer ' + token;
}

// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
// 挂载到window对象下
window.axios = axios;